import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 引入axios
import axios from 'axios'
import './plugins/element.js'
import './assets/css/global.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

Vue.config.productionTip = false
// 设置基准路径
axios.defaults.baseURL = 'http://www.klxin.cn:8888/api/private/v1/'
// 设置响应拦截器
axios.interceptors.response.use((res) => {
  return res.data
}, function (err) {
  console.log(err)
})
// http请求设置为axios请求
Vue.prototype.$http = axios

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
